package cn.nfwx.tv.model;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

public class Company implements Parcelable {

    /**
     * portrait : http://vodcdn.southtv.cn/company/aa/launch.jpg
     * company : 广汽菲亚特克莱斯勒公司
     * company_id : 1
     * videos : [{"url":"http://vodcdn.southtv.cn/company/aa/47960cdc-1533859438.mp4","duration":203,"video_id":1,"title":"测试"}]
     */

    private String portrait;
    private String company;
    private int company_id;
    private List<CompanyVideo> videos;
    private boolean press;

    public Company() {
    }

    protected Company(Parcel in) {
        portrait = in.readString();
        company = in.readString();
        company_id = in.readInt();
    }

    public static final Creator<Company> CREATOR = new Creator<Company>() {
        @Override
        public Company createFromParcel(Parcel in) {
            return new Company(in);
        }

        @Override
        public Company[] newArray(int size) {
            return new Company[size];
        }
    };

    public String getPortrait() {
        return portrait;
    }

    public void setPortrait(String portrait) {
        this.portrait = portrait;
    }

    public String getCompany() {
        return company;
    }

    public void setCompany(String company) {
        this.company = company;
    }

    public int getCompany_id() {
        return company_id;
    }

    public void setCompany_id(int company_id) {
        this.company_id = company_id;
    }

    public List<CompanyVideo> getVideos() {
        return videos;
    }

    public void setVideos(List<CompanyVideo> videos) {
        this.videos = videos;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(portrait);
        dest.writeString(company);
        dest.writeInt(company_id);
    }

    public boolean isPress() {
        return press;
    }

    public void setPress(boolean press) {
        this.press = press;
    }
}
